3.97 \(\int \sqrt{d x} (a+b \log (c x^n))^2 \, dx\)

Optimal. Leaf size=73 \[ -\frac{8 b n (d x)^{3/2} \left (a+b \log \left (c x^n\right )\right )}{9 d}+\frac{2 (d x)^{3/2} \left (a+b \log \left (c x^n\right )\right )^2}{3 d}+\frac{16 b^2 n^2 (d x)^{3/2}}{27 d} \]

[Out]

(16*b^2*n^2*(d*x)^(3/2))/(27*d) - (8*b*n*(d*x)^(3/2)*(a + b*Log[c*x^n]))/(9*d) + (2*(d*x)^(3/2)*(a + b*Log[c*x
^n])^2)/(3*d)

________________________________________________________________________________________

Rubi [A]  time = 0.0409941, antiderivative size = 73, normalized size of antiderivative = 1., number of steps used = 2, number of rules used = 2, integrand size = 20, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.1, Rules used = {2305, 2304} \[ -\frac{8 b n (d x)^{3/2} \left (a+b \log \left (c x^n\right )\right )}{9 d}+\frac{2 (d x)^{3/2} \left (a+b \log \left (c x^n\right )\right )^2}{3 d}+\frac{16 b^2 n^2 (d x)^{3/2}}{27 d} \]

Antiderivative was successfully verified.

[In]

Int[Sqrt[d*x]*(a + b*Log[c*x^n])^2,x]

[Out]

(16*b^2*n^2*(d*x)^(3/2))/(27*d) - (8*b*n*(d*x)^(3/2)*(a + b*Log[c*x^n]))/(9*d) + (2*(d*x)^(3/2)*(a + b*Log[c*x
^n])^2)/(3*d)

Rule 2305

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))^(p_.)*((d_.)*(x_))^(m_.), x_Symbol] :> Simp[((d*x)^(m + 1)*(a + b*Lo
g[c*x^n])^p)/(d*(m + 1)), x] - Dist[(b*n*p)/(m + 1), Int[(d*x)^m*(a + b*Log[c*x^n])^(p - 1), x], x] /; FreeQ[{
a, b, c, d, m, n}, x] && NeQ[m, -1] && GtQ[p, 0]

Rule 2304

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))*((d_.)*(x_))^(m_.), x_Symbol] :> Simp[((d*x)^(m + 1)*(a + b*Log[c*x^
n]))/(d*(m + 1)), x] - Simp[(b*n*(d*x)^(m + 1))/(d*(m + 1)^2), x] /; FreeQ[{a, b, c, d, m, n}, x] && NeQ[m, -1
]

Rubi steps

\begin{align*} \int \sqrt{d x} \left (a+b \log \left (c x^n\right )\right )^2 \, dx &=\frac{2 (d x)^{3/2} \left (a+b \log \left (c x^n\right )\right )^2}{3 d}-\frac{1}{3} (4 b n) \int \sqrt{d x} \left (a+b \log \left (c x^n\right )\right ) \, dx\\ &=\frac{16 b^2 n^2 (d x)^{3/2}}{27 d}-\frac{8 b n (d x)^{3/2} \left (a+b \log \left (c x^n\right )\right )}{9 d}+\frac{2 (d x)^{3/2} \left (a+b \log \left (c x^n\right )\right )^2}{3 d}\\ \end{align*}

Mathematica [A]  time = 0.016092, size = 61, normalized size = 0.84 \[ \frac{2}{27} x \sqrt{d x} \left (9 a^2+6 b (3 a-2 b n) \log \left (c x^n\right )-12 a b n+9 b^2 \log ^2\left (c x^n\right )+8 b^2 n^2\right ) \]

Antiderivative was successfully verified.

[In]

Integrate[Sqrt[d*x]*(a + b*Log[c*x^n])^2,x]

[Out]

(2*x*Sqrt[d*x]*(9*a^2 - 12*a*b*n + 8*b^2*n^2 + 6*b*(3*a - 2*b*n)*Log[c*x^n] + 9*b^2*Log[c*x^n]^2))/27

________________________________________________________________________________________

Maple [C]  time = 0.126, size = 710, normalized size = 9.7 \begin{align*} \text{result too large to display} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((d*x)^(1/2)*(a+b*ln(c*x^n))^2,x)

[Out]

2/3*d*b^2*x^2/(d*x)^(1/2)*ln(x^n)^2+2/9*d*b*x^2*(3*I*b*Pi*csgn(I*x^n)*csgn(I*c*x^n)^2-3*I*b*Pi*csgn(I*x^n)*csg
n(I*c*x^n)*csgn(I*c)-3*I*b*Pi*csgn(I*c*x^n)^3+3*I*b*Pi*csgn(I*c*x^n)^2*csgn(I*c)+6*b*ln(c)-4*b*n+6*a)/(d*x)^(1
/2)*ln(x^n)+1/54*d*(36*ln(c)^2*b^2-9*Pi^2*b^2*csgn(I*c*x^n)^4*csgn(I*c)^2-48*a*b*n+32*b^2*n^2+36*a^2+36*I*Pi*a
*b*csgn(I*x^n)*csgn(I*c*x^n)^2+36*I*Pi*a*b*csgn(I*c*x^n)^2*csgn(I*c)+18*Pi^2*b^2*csgn(I*x^n)*csgn(I*c*x^n)^3*c
sgn(I*c)^2+18*Pi^2*b^2*csgn(I*x^n)^2*csgn(I*c*x^n)^3*csgn(I*c)-9*Pi^2*b^2*csgn(I*x^n)^2*csgn(I*c*x^n)^2*csgn(I
*c)^2-36*Pi^2*b^2*csgn(I*x^n)*csgn(I*c*x^n)^4*csgn(I*c)+24*I*Pi*b^2*n*csgn(I*c*x^n)^3-36*I*ln(c)*Pi*b^2*csgn(I
*c*x^n)^3-36*I*Pi*a*b*csgn(I*c*x^n)^3-24*I*Pi*b^2*n*csgn(I*c*x^n)^2*csgn(I*c)+36*I*ln(c)*Pi*b^2*csgn(I*x^n)*cs
gn(I*c*x^n)^2+36*I*ln(c)*Pi*b^2*csgn(I*c*x^n)^2*csgn(I*c)-9*Pi^2*b^2*csgn(I*c*x^n)^6+72*ln(c)*a*b-48*ln(c)*b^2
*n-36*I*Pi*a*b*csgn(I*x^n)*csgn(I*c*x^n)*csgn(I*c)+18*Pi^2*b^2*csgn(I*c*x^n)^5*csgn(I*c)+18*Pi^2*b^2*csgn(I*x^
n)*csgn(I*c*x^n)^5-24*I*Pi*b^2*n*csgn(I*x^n)*csgn(I*c*x^n)^2-36*I*ln(c)*Pi*b^2*csgn(I*x^n)*csgn(I*c*x^n)*csgn(
I*c)+24*I*Pi*b^2*n*csgn(I*x^n)*csgn(I*c*x^n)*csgn(I*c)-9*Pi^2*b^2*csgn(I*x^n)^2*csgn(I*c*x^n)^4)*x^2/(d*x)^(1/
2)

________________________________________________________________________________________

Maxima [A]  time = 1.10184, size = 138, normalized size = 1.89 \begin{align*} \frac{2 \, \left (d x\right )^{\frac{3}{2}} b^{2} \log \left (c x^{n}\right )^{2}}{3 \, d} - \frac{8 \, \left (d x\right )^{\frac{3}{2}} a b n}{9 \, d} + \frac{4 \, \left (d x\right )^{\frac{3}{2}} a b \log \left (c x^{n}\right )}{3 \, d} + \frac{8}{27} \,{\left (\frac{2 \, \left (d x\right )^{\frac{3}{2}} n^{2}}{d} - \frac{3 \, \left (d x\right )^{\frac{3}{2}} n \log \left (c x^{n}\right )}{d}\right )} b^{2} + \frac{2 \, \left (d x\right )^{\frac{3}{2}} a^{2}}{3 \, d} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((d*x)^(1/2)*(a+b*log(c*x^n))^2,x, algorithm="maxima")

[Out]

2/3*(d*x)^(3/2)*b^2*log(c*x^n)^2/d - 8/9*(d*x)^(3/2)*a*b*n/d + 4/3*(d*x)^(3/2)*a*b*log(c*x^n)/d + 8/27*(2*(d*x
)^(3/2)*n^2/d - 3*(d*x)^(3/2)*n*log(c*x^n)/d)*b^2 + 2/3*(d*x)^(3/2)*a^2/d

________________________________________________________________________________________

Fricas [A]  time = 0.895862, size = 243, normalized size = 3.33 \begin{align*} \frac{2}{27} \,{\left (9 \, b^{2} n^{2} x \log \left (x\right )^{2} + 9 \, b^{2} x \log \left (c\right )^{2} - 6 \,{\left (2 \, b^{2} n - 3 \, a b\right )} x \log \left (c\right ) +{\left (8 \, b^{2} n^{2} - 12 \, a b n + 9 \, a^{2}\right )} x + 6 \,{\left (3 \, b^{2} n x \log \left (c\right ) -{\left (2 \, b^{2} n^{2} - 3 \, a b n\right )} x\right )} \log \left (x\right )\right )} \sqrt{d x} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((d*x)^(1/2)*(a+b*log(c*x^n))^2,x, algorithm="fricas")

[Out]

2/27*(9*b^2*n^2*x*log(x)^2 + 9*b^2*x*log(c)^2 - 6*(2*b^2*n - 3*a*b)*x*log(c) + (8*b^2*n^2 - 12*a*b*n + 9*a^2)*
x + 6*(3*b^2*n*x*log(c) - (2*b^2*n^2 - 3*a*b*n)*x)*log(x))*sqrt(d*x)

________________________________________________________________________________________

Sympy [B]  time = 7.88766, size = 216, normalized size = 2.96 \begin{align*} \frac{2 a^{2} \sqrt{d} x^{\frac{3}{2}}}{3} + \frac{4 a b \sqrt{d} n x^{\frac{3}{2}} \log{\left (x \right )}}{3} - \frac{8 a b \sqrt{d} n x^{\frac{3}{2}}}{9} + \frac{4 a b \sqrt{d} x^{\frac{3}{2}} \log{\left (c \right )}}{3} + \frac{2 b^{2} \sqrt{d} n^{2} x^{\frac{3}{2}} \log{\left (x \right )}^{2}}{3} - \frac{8 b^{2} \sqrt{d} n^{2} x^{\frac{3}{2}} \log{\left (x \right )}}{9} + \frac{16 b^{2} \sqrt{d} n^{2} x^{\frac{3}{2}}}{27} + \frac{4 b^{2} \sqrt{d} n x^{\frac{3}{2}} \log{\left (c \right )} \log{\left (x \right )}}{3} - \frac{8 b^{2} \sqrt{d} n x^{\frac{3}{2}} \log{\left (c \right )}}{9} + \frac{2 b^{2} \sqrt{d} x^{\frac{3}{2}} \log{\left (c \right )}^{2}}{3} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((d*x)**(1/2)*(a+b*ln(c*x**n))**2,x)

[Out]

2*a**2*sqrt(d)*x**(3/2)/3 + 4*a*b*sqrt(d)*n*x**(3/2)*log(x)/3 - 8*a*b*sqrt(d)*n*x**(3/2)/9 + 4*a*b*sqrt(d)*x**
(3/2)*log(c)/3 + 2*b**2*sqrt(d)*n**2*x**(3/2)*log(x)**2/3 - 8*b**2*sqrt(d)*n**2*x**(3/2)*log(x)/9 + 16*b**2*sq
rt(d)*n**2*x**(3/2)/27 + 4*b**2*sqrt(d)*n*x**(3/2)*log(c)*log(x)/3 - 8*b**2*sqrt(d)*n*x**(3/2)*log(c)/9 + 2*b*
*2*sqrt(d)*x**(3/2)*log(c)**2/3

________________________________________________________________________________________

Giac [C]  time = 1.97107, size = 517, normalized size = 7.08 \begin{align*} \text{result too large to display} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((d*x)^(1/2)*(a+b*log(c*x^n))^2,x, algorithm="giac")

[Out]

(1/3*I + 1/3)*sqrt(2)*b^2*n^2*x^(3/2)*sqrt(abs(d))*cos(1/4*pi*sgn(d))*log(x)^2 - (1/3*I - 1/3)*sqrt(2)*b^2*n^2
*x^(3/2)*sqrt(abs(d))*log(x)^2*sin(1/4*pi*sgn(d)) - (4/9*I + 4/9)*sqrt(2)*b^2*n^2*x^(3/2)*sqrt(abs(d))*cos(1/4
*pi*sgn(d))*log(x) + (2/3*I + 2/3)*sqrt(2)*b^2*n*x^(3/2)*sqrt(abs(d))*cos(1/4*pi*sgn(d))*log(c)*log(x) + (4/9*
I - 4/9)*sqrt(2)*b^2*n^2*x^(3/2)*sqrt(abs(d))*log(x)*sin(1/4*pi*sgn(d)) - (2/3*I - 2/3)*sqrt(2)*b^2*n*x^(3/2)*
sqrt(abs(d))*log(c)*log(x)*sin(1/4*pi*sgn(d)) + (8/27*I + 8/27)*sqrt(2)*b^2*n^2*x^(3/2)*sqrt(abs(d))*cos(1/4*p
i*sgn(d)) - (4/9*I + 4/9)*sqrt(2)*b^2*n*x^(3/2)*sqrt(abs(d))*cos(1/4*pi*sgn(d))*log(c) + (2/3*I + 2/3)*sqrt(2)
*a*b*n*x^(3/2)*sqrt(abs(d))*cos(1/4*pi*sgn(d))*log(x) - (8/27*I - 8/27)*sqrt(2)*b^2*n^2*x^(3/2)*sqrt(abs(d))*s
in(1/4*pi*sgn(d)) + (4/9*I - 4/9)*sqrt(2)*b^2*n*x^(3/2)*sqrt(abs(d))*log(c)*sin(1/4*pi*sgn(d)) - (2/3*I - 2/3)
*sqrt(2)*a*b*n*x^(3/2)*sqrt(abs(d))*log(x)*sin(1/4*pi*sgn(d)) - (4/9*I + 4/9)*sqrt(2)*a*b*n*x^(3/2)*sqrt(abs(d
))*cos(1/4*pi*sgn(d)) + (4/9*I - 4/9)*sqrt(2)*a*b*n*x^(3/2)*sqrt(abs(d))*sin(1/4*pi*sgn(d)) + 2/3*b^2*sqrt(d)*
x^(3/2)*log(c)^2 + 4/3*a*b*sqrt(d)*x^(3/2)*log(c) + 2/3*a^2*sqrt(d)*x^(3/2)